import Vue from 'vue'
import Router from 'vue-router'
import LogIn from '@/components/LogIn'
import TaBarBottom from '@/components/TaBarBottom'
import Slideshow from '@/components/Slideshow'

const Home = () => import("@/views/HomePage/Home")
const PartTime = () => import("@/views/PartTime/PartTime")
const My = () => import("@/views/My/Mymi")

const Inform = () => import("@/views/HomePageVillageHeatImg/InformImg")
const Affair = () => import("@/views/HomePageVillageHeatImg/AffairImg")
const Maintain = () => import("@/views/HomePageVillageHeatImg/MaintainImg")
const PovertyRelief = () => import("@/views/HomePageVillageHeatImg/PovertyReliefImg")
const Salvation = () => import("@/views/HomePageVillageHeatImg/SalvationImg")
const Treasure = () => import("@/views/HomePageVillageHeatImg/TreasureImg")
const Breed = () => import("@/views/HomePageVillageHeatImg/BreedImg")
const Opinion = () => import("@/views/HomePageVillageHeatImg/OpinionImg")

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "",
      redirect: "/LogIn"
    },
    {
      path: "/LogIn",
      name: "LogIn",
      component: LogIn
    },
    {
      path: "/Inform",
      name: "Inform",
      component: Inform
    },
    {
      path: "/Affair",
      name: "Affair",
      component: Affair
    },
    {
      path: "/Maintain",
      name: "Maintain",
      component: Maintain
    },
    {
      path: "/PovertyRelief",
      name: "PovertyRelief",
      component: PovertyRelief
    },
    {
      path: "/Salvation",
      name: "Salvation",
      component: Salvation
    },
    {
      path: "/Treasure",
      name: "Treasure",
      component: Treasure
    },
    {
      path: "/Breed",
      name: "Breed",
      component: Breed
    },
    {
      path: "/Opinion",
      name: "Opinion",
      component: Opinion
    },
    

    {
      path: '/TaBarBottom',
      name: 'TaBarBottom',
      component: TaBarBottom,
      children: [
        {
          path: '',
          redirect : "Home"
       },
       {
          path: 'Home',
          component: Home
       },
       {
        path: 'PartTime',
        component: PartTime
       },
       {
        path: 'My',
        component: My
        },
      ]
    },
    {
      path: "/Slideshow",
      name: "Slideshow",
      component: Slideshow
    },
  ],
  mode:"history",
})
